<?php TPL::output('admin/global/header.tpl.htm'); ?>
<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<div id="main-content" style="margin:0 0 0 200px;">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3> 站点功能 </h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div id="notification_box" class="notification success png_bg" style="display:none;"> <a class="close" href="javascript:;"></a>
				<div name="notification_content"></div>
			</div>
			<div class="tab-content default-tab" id="tab1">
				<form id="_save_form" action="admin/setting/sys_save_ajax/" method="post">
					<fieldset>
					<p groupid="3" name="site_announce">
						<label>网站公告：<span style="font-weight:normal">(支持HTML)</span></label>
						<textarea name="site_announce" cols="100" rows="3" id="site_announce"><?php echo $this->setting['site_announce']; ?></textarea>
					</p>
					<p groupid="3" name="url_rewrite_enable">
						<label>开启 Rewrite 伪静态：<span style=" font-weight:normal;">(Rewrite 开启方法请见 ReadMe 说明文件)</span></label>
						<input type="radio" name="url_rewrite_enable" value="Y" <?php if ($this->setting['url_rewrite_enable'] == 'Y'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="url_rewrite_enable" value="N" <?php if ($this->setting['url_rewrite_enable'] == 'N'){ ?> checked="true"<?php } ?>/>
						否 </p>
					<p groupid="3" name="request_route" style="display:none;">
						<label>URL 链接显示样式：</label>
					<table name="request_route">
						<tr style="height:20px;">
							<th style="width:150px; vertical-align:middle; "> <label style="float:left;">
								<input type="radio" value="1" name="request_route" <?php if ($this->setting['request_route'] == '1'){ ?> checked="true"<?php } ?>>
								默认 </label>
							</th>
							<td><span style=" font-weight:normal;">
								<?php echo get_setting('base_url'); ?>/question/123<br>
								<?php echo get_setting('base_url'); ?>/topic/123<br>
								<?php echo get_setting('base_url'); ?>/people/anwsion<br>
								<?php echo get_setting('base_url'); ?>/category/123
							</span></td>
						</tr>
						<tr style="height:20px;">
							<th style="width:150px; vertical-align:middle; "> <label style="float:left;">
								<input type="radio" value="2" name="request_route" <?php if ($this->setting['request_route'] == '2'){ ?> checked="true"<?php } ?>>
								简短模式 </label>
							</th>
							<td><span style=" font-weight:normal;">
								<?php echo get_setting('base_url'); ?>/q_123<br>
								<?php echo get_setting('base_url'); ?>/t_话题.html<br>
								<?php echo get_setting('base_url'); ?>/p_admin.html<br>
								<?php echo get_setting('base_url'); ?>/c_123.html
								</span> </td>
						</tr>
						<tr style="height:20px;">
							<th style="width:150px; vertical-align:middle; "> <label style="float:left;">
								<input type="radio" value="99" name="request_route" <?php if ($this->setting['request_route'] == '99'){ ?> checked="true"<?php } ?>>
								自定义路由 </label>
							</th>
							<td><textarea name="request_route_custom" cols="100" rows="3" id="request_route_custom"><?php echo $this->setting['request_route_custom']; ?></textarea>
							</td>
						</tr>
					</table>
					<p style="color:#999;display:none;" name="request_route_custom" groupid="3">此模式只有开启 Rewrite 后有效, 请填写简略正则表达式, 每行一条规则,中间使用===隔开,左边为站点默认 URL 模式,右边为替换后的 URL 模式, 链接以 / 开头, (:num) 代表数字, (:any) 代表任意字符<br />
						如替换站点规则与分类规则：<br />
						/question/(:any)===/q_(:any)<br />
						/home/explore/category-(:num)===/category/(:num)<br />
						将发现替换到首页:<br/>
						/home/explore/===/<br />
						(!) 警告: 使用此功能之前请确定你对替换有所把握, 错误的规则将导致站点不能运行</p>
					</p>
					<?php if(file_exists(realpath(AWS_PATH . '../') . '/uc_client/')){ ?>
					<p groupid="3" name="ucenter_enabled">
						<label>开启 Ucenter 用户对接：<span style=" font-weight:normal;">(第一次使用需要安装 UCenter 扩展包)</span></label>
						<input type="radio" name="ucenter_enabled" value="Y" <?php if ($this->setting['ucenter_enabled'] == 'Y'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="ucenter_enabled" value="N" <?php if ($this->setting['ucenter_enabled'] == 'N'){ ?> checked="true"<?php } ?>/>
						否 </p>
					<?php } ?>
					<p groupid="3" name="online_count_open">
						<label>开启在线会员统计：</label>
						<input type="radio" name="online_count_open" value="Y" <?php if ($this->setting['online_count_open'] == 'Y'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="online_count_open" value="N" <?php if ($this->setting['online_count_open'] == 'N'){ ?> checked="true"<?php } ?>/>
						否 </p>
					<p groupid="3" name="online_interval">
						<label>在线会员统计时间范围：<span style="font-weight:normal">(单位:分钟)</span></label>
						<input name="online_interval" class="text-input small-int" type="text" value="<?php echo $this->setting['online_interval']; ?>"/>
					</p>
					<p groupid="3" name="unread_flush_interval">
						<label>通知未读数刷新间隔时间：<span style="font-weight:normal">(单位:秒)</span></label>
						<input name="unread_flush_interval" class="text-input small-int" type="text" value="<?php echo $this->setting['unread_flush_interval']; ?>"/>
					</p>
					<p groupid="3" name="auto_question_lock_day">
						<label>站点自动锁定时间：<span style="font-weight:normal">(单位:天，站点超过设定天数没有动作，系统则会自动锁定该站点，0为关闭自动锁定)</span></label>
						<input name="auto_question_lock_day" class="text-input small-int" type="text" value="<?php echo $this->setting['auto_question_lock_day']; ?>"/>
					</p>
					<p groupid="3" name="statistic_code">
						<label>网站统计代码：</label>
						<textarea name="statistic_code" cols="100" rows="3" id="statistic_code"><?php echo $this->setting['statistic_code']; ?></textarea>
					</p>
					<p groupid="3" name="sensitive_words">
						<label>站点举报理由选项：<span style=" font-weight:normal;">(每行填写一个举报理由)</span></label>
						<textarea name="report_reason" cols="100" rows="4" id="report_reason" style="width:200px;"><?php echo get_setting('report_reason'); ?></textarea>
					</p>
					<p groupid="3" name="report_message_uid">
						<label>站点有新举报发私信提醒用户ID：<span style="font-weight:normal;">(留空则发送到id为1的用户)</span></label>
						<input name="report_message_uid" class="text-input small-int" type="text" value="<?php echo $this->setting['report_message_uid']; ?>"/>
					</p>
					<p groupid="3" name="report_message_uid">
						<label>系统时间显示格式：</label>
						<label style="font-weight:normal;"><input type="radio" name="time_style" value="Y" <?php if ($this->setting['time_style'] == 'Y'){ ?> checked="true"<?php } ?>/>xx分钟前形式(例：5分钟前)</label>
						<label style="font-weight:normal;"><input type="radio" name="time_style" value="N" <?php if ($this->setting['time_style'] == 'N'){ ?> checked="true"<?php } ?>/>完整形式(例：<?php echo date('Y-m-d H:i'); ?>)</label>

					</p>
					<p groupid="3" name="admin_login_seccode">
						<label>管理员后台登录是否需要验证码：</label>
						<input type="radio" name="admin_login_seccode" value="Y" <?php if ($this->setting['admin_login_seccode'] == 'Y'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="admin_login_seccode" value="N" <?php if ($this->setting['admin_login_seccode'] == 'N'){ ?> checked="true"<?php } ?>/>
						否
					</p>
					<p>
						<input class="button" type="button" onClick="ajax_post($('#_save_form'), _form_process);" value="  保  存  " />
					</p>
					</fieldset>
					<div class="clear"></div>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>
	<!-- footer -->
	<?php TPL::output('admin/global/footer.tpl.htm'); ?>
	<!-- footer -->
</div>
<!-- main -->
</div>
</body></html>